package com.project.bean;

import java.time.LocalDate;

public class StudentBean {
    //    id
    private Integer id;
    //    姓名
    private String name;
    //    性别
    private String sex;
    //    手机号
    private String phoneNum;
    //    入住时间
    private LocalDate liveDate = LocalDate.now();
    //    班级
    private ClassBean classBean;
    //    房间
    private RoomBean roomBean;
    //    头像
    private String faceImg;

    public StudentBean() {
    }

    public StudentBean(String name, String sex, String phoneNum, LocalDate liveDate, ClassBean classBean, RoomBean roomBean, String faceImg) {
        this.name = name;
        this.sex = sex;
        this.phoneNum = phoneNum;
        this.liveDate = liveDate;
        this.classBean = classBean;
        this.roomBean = roomBean;
        this.faceImg = faceImg;
    }

    public StudentBean(String name, String sex, String phoneNum, Integer classId, Integer roomId, String faceImg) {
        this.name = name;
        this.sex = sex;
        this.phoneNum = phoneNum;
        this.classBean = new ClassBean();
        this.classBean.setId(classId);
        this.roomBean = new RoomBean();
        this.roomBean.setId(roomId);
        this.faceImg = faceImg;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public LocalDate getLiveDate() {
        return liveDate;
    }

    public void setLiveDate(LocalDate liveDate) {
        this.liveDate = liveDate;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    public String getFaceImg() {
        return faceImg;
    }

    public void setFaceImg(String faceImg) {
        this.faceImg = faceImg;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", phoneNum='" + phoneNum + '\'' +
                ", liveDate=" + liveDate +
                ", classBean=" + classBean +
                ", roomBean=" + roomBean +
                ", faceImg='" + faceImg + '\'' +
                '}' + "\n";
    }
}
